<?php

declare(strict_types=1);

namespace app\yperp\command;

use app\yperp\common\ChanghongList;
use app\yperp\common\MyWebDriver;
use app\yperp\common\Redis;
use app\yperp\model\Supplier;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\Output;


class test2 extends Command
{


    protected $output;

    protected $input;
    protected $driver;
    protected $windows = [];
    protected $cookies = [];
    protected function configure()
    {
        // 指令配置
        $this->setName('test2')
            ->addArgument('goodsId', Argument::OPTIONAL, "goodsId")
            ->setDescription('测试命令：test2');
    }

    protected function execute(Input $input, Output $output)
    {
        // 指令输出
        $this->input = $input;

        $this->output = $output;
        MyWebDriver::getInstance()->run([
            ['type' => 'this', 'do' => ['this_method' => 'WebDriver', 'fastrun' => true],  'sleep' => 3],

            ['type' => 'open', 'do' => ['url' => 'https://www.taobao.com'], 'sleep' => 3],
            // ['type' => 'open', 'do' => ['url' => 'https://www.baidu.com'], 'sleep' => 3],

        ]);
    }
}
